package com.taowan.xunbaozl.morning_speak.design_pattern.pre;

/**
 * Created by 杨观回 on 2016/2/25 0025.
 * 对象的适配器模式
 * <p/>
 * 相对于其他2种更为重要
 */
public class ObjectAdapter {
    private Example2 example2;

    public ObjectAdapter(Example2 example2) {
        this.example2 = example2;
    }

    public void method() {
        this.example2.example2();
    }
}

class Example2 {
    public void example2() {
        System.out.println("Example2 example2");
    }
}



